package com.cc.study.spel;

import com.cc.study.di.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author C.
 * @Date 2019-05-01 23:10
 */
public class TestSpEL {
    @Test
    public void demo01(){
        String xmlPath = "spel.xml";
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);
        Person person = (Person) applicationContext.getBean("personId");
        System.out.println(person.getPname());
        System.out.println(person.getAge());
    }
}
